import request from '@/utils/request'

const apiName = '/api/hosp/hospital'

export default{
    //查询医院列表
    getPageList(page,limit,searchObj){
        return request({
            url:`${apiName}/findHospList/${page}/${limit}`,
            method : 'get',
            params : searchObj
        })
    },
    //根据医院名称做模糊查询
    getByHosname(hosname){
        return request({
            url:`${apiName}/findByHosName/${hosname}`,
            method:'get',
        })
    },
    show(hoscode) {
        return request({
            url: `${apiName}/findHospDetail/${hoscode}`,
            method: 'get'
        })
    },
    findDepartment(hoscode) {
        return request({
            url: `${apiName}/department/${hoscode}`,
            method: 'get'
        })
    },
    //获取可预约的排班信息
    getBookingScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `${apiName}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get'
        })
    },
    //获取排班信息
    findScheduleList(hoscode, depcode, workDate) {
        return request({
            url: `${apiName}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
            method: 'get'
        })
    },
    //根据排班id获取排班数据
    getSchedule(id) {
        return request({
          url: `${apiName}/getSchedule/${id}`,
          method: 'get'
        })
    }
        
    


}